﻿using System;

namespace Rsdn.SmartApp.Old
{
    /// <summary>
    /// Instancing Helper class
    /// </summary>
    public static class InstancingHelper
    {
        /// <summary>
        /// Creates the instance.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="type">The type.</param>
        /// <param name="provider">The provider.</param>
        /// <param name="customParams">The custom params.</param>
        /// <returns></returns>
        public static T CreateInstance<T>(this Type type, IServiceProvider provider, params InstancingCustomParam[] customParams)
        {
            return (T)type.CreateInstance(provider, customParams);
        }
    }
}
